<!DOCTYPE html>
<html>

    <head>
        <title>
            <?php
            require_once 'includes/constants.php';
            require_once 'includes/class-cart.php';

            bloginfo('name');
            ?>
        </title>
        <link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />
    </head>

    <body>

        <nav>
            <?php get_template_part('categories'); ?>
        </nav>

        <?php
        if (!empty($_GET[CATEGORY_TAXONOMY])) {
            get_template_part('products');
        }
        ?>

        <p><a href="index.php?site=cart"><?php echo 'Cart(' . Buffalo_Cart::get_total_quantity() . ')'; ?></a></p>

        <?php
        if ($_GET['site'] == 'cart') {
            get_template_part('shopping-cart');
        } else if ($_GET['site'] == 'checkout') {
            get_template_part('checkout');
        }
        ?>

    </body>

</html>
